package top.kaoshanji.p2ch17b;

import top.kaoshanji.p2ch17a.SchoolReport;

/**
 * 代码清单-p2ch17b-196页a：修饰的抽象类
 * @author kaoshanji
 * ^_^
 * create time 2025/3/24 10:44
 */
public abstract class Decorator extends SchoolReport {

    // 首先我要知道是哪个成绩单
    private SchoolReport sr;

    // 构造函数，传递成绩单过来
    public Decorator(SchoolReport sr) {
        this.sr = sr;
    }

    // 成绩单还是要被看到的
    public void report() {
        this.sr.report();
    }

    // 看完还是要签名的
    public void sign(String name) {
        this.sr.sign(name);
    }

}
